/*
 * Copyright (c) 2015 Messcat. All rights reserved.
 * 
 */
package cc.messcat.service.system;

import cc.messcat.common.model.Pager;
import cc.messcat.common.service.BaseService;
import cc.messcat.entity.area.Area;
import cc.messcat.entity.system.McUser;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

/**
 * 用户接口
 *
 * @author Microcat
 * @version 1.0
 */
public interface UserService extends BaseService<McUser> {

    McUser retrieveUserById(Long id);

    McUser retrieveUserByIdWithoutPermission(Long id);

    McUser retrieveUserByUsernameIgnorePassword(String username);

    McUser retrieveUserByUsername(String username);

    McUser retrieveUserWithRoleByUsernames(String username);

    /**
     * 登录
     *
     * @param userName
     * @author Panda
     */
    McUser modifyForLogin(String userName);

    void addUser(McUser user, Long roleId);

    void modifyUser(McUser user, Long roleId);

//    int modifyPasswordUser(McUser user, String authPassword, String oldPassword);

    void removeUser(Long id);

    boolean verifyOldPassword(String username, String oldPassword);

    Pager retrieveUserAll(Integer pageNo, Integer pageSize);

//	List<McUser> listByRoleArea(Area area);

    List<McUser> listByUserArea(Area area);

    Pager<McUser> getPage(Integer pageNo, Integer pageSize, String username, String realName, String mobilePhone, String email, McUser user, McUser loginuser, Long countryId, Long villageId,String checkState);

	List<McUser> verifyUsername(String username);

	int modifyPasswordUser(McUser user, String authPassword, String oldPassword, HttpSession session);

    List<Map<String,Object>> listByIDs(String praise);

	void addUserByPhone(McUser user);
}
